package cn.lizemin.demo.thread.lambda;

/**
 * @author: lizemin
 * @version: 1.0
 */
public class LambdaDemo {
    //这是一个main方法,是程序的入口
    public static void main(String[] args) {
        //使用lambda表达式创建线程对象
        Runnable my = () -> System.out.println("小猫爱吃鱼");
        Thread my_thread = new Thread(my);
        my_thread.start();
        for (int i = 0; i < 20; i++) {
            System.out.println("主线程--------"+i);

        }

    }
}
